﻿<!--#include file="const.inc"-->
<%
'====================================================================
' 感谢使用晴天3G智能建站系统..
' 作者:梁永强.QQ:766750857
' 官方网址:wap.qt3g.com
' 声明:软件版权归作者所有,没有经过作者本人同意不得非法破解和传播本程序
'====================================================================
%>
<%
if sid="Null" then
Response.Redirect "/login.asp?sid="&sidd&"&url=/game/fish/index.asp"
else
select case v
case "0"
we0="<br/>"
%>
<card id="main" title="钓鱼-休闲"><p align="<%=qingtian.px%>">
<%
case "1"
zi="<span style=""color:#FF5500"">"
we="<div class=""footer"">"
sou="<div class=""block4"">"
dao="<div class=""navi"">"
we0="</div>"
%>
<title>钓鱼-休闲</title>
</head>
<body>
<!--#include virtual="/css.inc"-->
<%
End Select
%>
<!--#include file="conn.inc"-->
<%=dao%><img src="fishing-logo.gif" alt="钓鱼-图"/><br/>==钓鱼-休闲==<%=we0%><%=we%>
<%
dim aim
aim=Request("aim")
If aim<>"eat" And aim<>"sell" then
rs.Open "select bait,fish from basis where UserID="&qingtian.nid,cn
	response.Write "钓到鱼能卖到钱赚到金币哦！<br/> <a href=""start.asp?aim=sell&amp;sid="&sidd&""">My要开始了</a><br/>"
Else
	rs.open "select bait from basis where UserID="&qingtian.nid,cn
	If rs("bait")>0 Then
		Randomize
		If Int(2*Rnd()+1)=1 Then
			Randomize
            rn=Int(105*Rnd()+1)
            namee="卖鱼得到+"
				If rn>=1 And rn<=60 Then
					Randomize
					diffmain=Int(3*Rnd()+1)
					addmain=5
					addgold=5
					name="一条鲭鱼"
				ElseIf rn>60 And rn<=80 Then
					Randomize
					diffmain=Int(2*Rnd())+5
					addmain=10
					addgold=10
					name="一条鲫鱼"
				ElseIf rn>80 And rn<=95 Then
					diffmain=10
					addmain=20
					addgold=20
					name="一条鲤鱼"
				ElseIf rn>95 And rn<=100 Then
					diffmain=20
					addmain=50
					addgold=50
					name="一条鲢鱼"
				ElseIf rn>100 And rn<=105 Then
					diffmain=20
					addmain=50
					addgold=-50
					name="一个炸弹"
                                        namee="恭喜你中招了，被炸去"
				End If
			cn.execute("update basis set fish=fish+1 where UserID="&qingtian.nid)
				Tip="你钓到"&name&","
				If aim="sell" Then
                                        qingtian.payy(addgold)
					Tip=Tip&namee&addgold&""&qingtian.bi&"。<br/>"
				Else
			
                                        qingtian.payy(addgold)
					Tip=Tip&namee&addgold&""&qingtian.bi&"。<br/>"
				End If
        		Else

			cn.execute("update basis set bait=bait-1")
			Tip="ohoh!~鱼饵被吃掉 HOHO<br/>鱼饵不见了一个哦,<br/>"
		End If
		Tip=Tip&"<a href=""start.asp?sid="&sidd&"&amp;aim="&aim&""">继续钓鱼</a><br/>"
	Else
		Tip="额？ 刚刚还有的啊~~哪个偷我鱼饵？ 看俺教训你！<br/><a href=""index.asp?sid="&sidd&"&amp;act=buy"">买鱼饵（5只/100金币）</a><br/>"
	End If
End if

Response.Write Tip%>
<%=we0%><%=sou%>
你现有<%=cn.execute("select bait from basis where UserID="&qingtian.nid)("bait")%>只鱼饵。<br/>
你现有<%=conn.execute("select money from [qingtian_user] where sid='"&qingtian.Formatsid(sid)&"'")("money")%>个<%=qingtian.bi%>。<br/>
----------<%=we0%><%=dao%>
<!--#INCLUDE FILE="free.inc"-->
<a href="index.asp?sid=<%=sidd%>">返回钓鱼</a>◆
<%
Response.Write("<a href='/index.asp?sid=" & sidd & "'>网站首页</a>")
end if
end function
%>